#pragma once
#include "../DirectX/stdafx.h"

struct Vertex
{
public:
	POINT					Position;

	D3DXVECTOR2				Dir_father,
							Dir_children;

	float					length_father,
							length_children;

	bool					reverse;

	Vertex()
	{
		Position.x = 0;
		Dir_father.x = Dir_children.x = 0;
		Position.y = 0;
		Dir_father.y = Dir_children.y = -1; //! -1
		reverse			=	false;
		length_father	=	0;
		length_children	=	0;
	}
	Vertex(POINT Position_)
	{
		reverse			=	true;
		Position		=	Position_;
		length_father	=	0;
		length_children	=	0;
	}
	Vertex(POINT Position_, D3DXVECTOR2 Dir_, float length)
	{
		reverse			=	false;
		Position		=	Position_;
		Dir_father		=	Dir_;
		length_father	=	length;
		length_children	=	0;
	}

	void setChildren(const D3DXVECTOR2 &dir, float length)
	{
		Dir_children	=	dir;
		length_children	=	length;
	}
	bool operator == (Vertex &obj)
	{
		return (Position.x == obj.Position.x && Position.y == obj.Position.y && Dir_father == obj.Dir_father && Dir_children == obj.Dir_children);
	}
};